package code.structure.module.configs.cmd
{
	import code.structure.module.configs.data.AreaConfigData;
	import code.structure.module.configs.data.ItemConfigData;
	import code.structure.module.configs.data.attach.ProductAttachData;
	
	import flash.utils.Dictionary;

	/**
	 *  物品数据
	 * @author Yuri
	 * 
	 */
	public class AnalysisArea
	{
		/**
		 * 物品字典 
		 */
		private var _areaDataDic:Dictionary;
		public function AnalysisArea()
		{
			_areaDataDic = new Dictionary();
		}
		
		/**
		 *解析 
		 * @param itemData
		 * @param productData
		 * 
		 */
		public function parserData(areaData:Object):void{
			var d:AreaConfigData 
			for each(var o:Object in areaData){
				d = new AreaConfigData(o);
				_areaDataDic[d.id] = d;
			}
		}
		
		/**
		 * 通过id获取配置数据 
		 * @param id
		 * @return 
		 * 
		 */
		public function getAreaConfigDataById(id:String):AreaConfigData{
			return _areaDataDic[id] as AreaConfigData;
		}
	}
}